{include file='public/header' /}

<div class="layui-card">
    <form class="layui-form" method="post">

        <div class="layui-card-body">
            <fieldset class="layui-elem-field layui-field-title">
                <legend><h3>{$row.title}</h3></legend>
            </fieldset>

            <div class="layui-card-body">

                <fieldset class="layui-elem-field">
                    <legend>内容</legend>
                    <div class="layui-field-box">
                        {$row->info}
                    </div>
                </fieldset>
                <br>
              
                {if $row.image[0]!=''}
                <fieldset class="layui-elem-field">
                    <legend>图片</legend>
                    <div class="layui-field-box">
                        <div class="pic-more">
                            <ul class="pic-more-upload-list" id="slide-pc-priview" style="display:inline;white-space: nowrap;">
                                {foreach $row.image as $v}
                                <li class="item_img" style="padding: 10px 20px;
            display: inline-block;
            background:pink;
            white-space:nowrap;">
                                    <img src="{$v}" style="width: 100px;height:100px" class="img" >
                                </li>
                                {/foreach}
                            </ul>
                        </div>
                    </div>
                </fieldset>
                {/if}
                <input type="hidden" name="id" value="{$row.id}">
                <br>
                {if $row.video}
                <fieldset class="layui-elem-field">
                    <legend>视频 </legend>
                    <div class="layui-field-box">
                        <video  id='video' src="{$row.video}" width="500" height="240" controls autobuffer></video>

                    </div>
                </fieldset>

                <br>
                {/if}



            </div>
        </div>
</div>
</form>
{include file='public/footer' /}
<script type="text/javascript">
    $(function(){
        var img_show = null; // tips提示
        $('img').hover(function(){
            var kd=$(this).width();
            kd1=kd*4;          //图片放大倍数
            kd2=kd*4+30;       //图片放大倍数
            var img = "<img class='img_msg' src='"+$(this).attr('src')+"' style='width:"+kd1+"px;' />";
            img_show = layer.tips(img, this,{
                tips:[2, 'rgba(41,41,41,.5)']
                ,area: [kd2+'px']
            });
        },function(){
            layer.close(img_show);
        });
    })
    // $('img').attr('style','max-width:70px;display:block!important');


    $('#video').click(function () {
        var src =$(this).attr('src');
        var loadstr = '<video width="800px" height="500px"  controls="controls" autobuffer="autobuffer"  autoplay="autoplay" loop="loop">' +
                '<source src=' +src+' type="video/mp4"></source></video>'
        layer.open({
            type: 1,
            title: '播放视频',
            area: '800px',
            content: loadstr,
        });
    })
    //关闭帖子


</script>